#ifdef a
#include<stdio.h>
int JudgeWordsCount(char* tmp) {
    int count = 0;
    //开头空格的判断
    while (*tmp && *tmp == ' ')
        tmp++;
    count++;
    //中间和最后
    while (*tmp) {
        if (*tmp == ' ') {
            while (*tmp == ' ') {
                tmp++;
                if (!(*tmp))
                    return count;
            }
            count++;
        }
        else
            tmp++;
    }
    return count;
}
int main() { 
    char input[100] = { 0 };
    gets(input);
    int count = JudgeWordsCount(input);
    printf("共有单词%d", count);
    return 0;
}
#endif
